<?php $this->load->module('mobile/index/header', $common); ?>

<link rel="stylesheet" type="text/css" href="<?php echo URLPRE;?>static/template/default/mobile/css/main.css" />
<link rel="stylesheet" type="text/css" href="<?php echo URLPRE;?>static/template/default/mobile/css/dialog.css" />
<link rel="stylesheet" type="text/css" href="<?php echo URLPRE;?>static/template/default/mobile/css/base.css" />
<link rel="stylesheet" type="text/css" href="<?php echo URLPRE;?>static/template/default/mobile/css/index.css" />
<link rel="stylesheet" type="text/css" href="<?php echo URLPRE;?>static/template/default/mobile/css/line.css" />

<script type="text/javascript" src="<?php echo URLPRE;?>static/template/default/mobile/js/mobilecommon.js"></script>
<script type="text/javascript" src="<?php echo URLPRE;?>static/template/default/mobile/js/slider.js"></script>
<script type="text/javascript" src="<?php echo URLPRE;?>static/template/default/mobile/js/dialog.js"></script>
<!-- 页面内容块 -->
<div class="content">
    <div class="center-header-content">
                <div class="center-header-box">
                    <div class="header-avatar"><img onerror="this.error=null;this.src='<?php echo URLPRE; ?>static/public/images/nophoto.jpg'" src="<?php echo get_thumb($info['avatar']); ?>"></div>
                    <div class="header-info">
                        <p class="info-item"><?php if(ADMINID):?>管理员-<?php else:?>会员-<?php endif;?><?php echo $info['realname'] ? $info['realname'] : $info['name']?$info['name']:$account; ?></p>
                         <?php if ($identity == '1'):?>
                            <p class="info-item">积分 : <?php echo  $this->data['info']['integral'];?></p>
                        <?php endif; ?>
                        <?php if(ADMINID):?>
                            <p class="info-tel"><a href="tel:<?php echo $info['mobile']?$info['mobile']:$site_service_phone; ?>"><?php echo $info['mobile']?$info['mobile']:$site_service_phone; ?></p>
                        <?php endif;?>
                    </div>
                </div>
    </div>
    <?php if(ADMINID):?>
    <div class="center-record-content">
        <div class="center-record-box">
         <h1>访问记录</h1>
         <ul class="record-list">
             <li class="record-list-item"><a href="javascript:;">今日访问<i><?php echo $todaycount?></i></a></li>
             <li class="record-list-item"><a href="javascript:;">昨日访问<i><?php echo $yesterdaycount?></i></a></li>
             <li class="record-list-item"><a href="javascript:;">本周访问<i><?php echo $weekcount?></i></a></li>
             <li class="record-list-item"><a href="<?php echo site_url('mobile/member/rank') ?>">点击查看<br/>访问排行</a></li>
         </ul>
     </div>
    </div>
    <?php endif;?>
    <div class="center-menu-content">
        <div class="center-menu-box">
            <ul class="menu-list">
                <li class="menu-list-item item-favourite"><a href="<?php echo site_url('mobile/member/favourite_list') ?>">我的收藏</a><i></i></li>
                <li class="menu-list-item item-order"><a href="<?php echo site_url('mobile/order/line_list') ?>">我的订单</a><i></i></li>
                <li class="menu-list-item item-info"><a href="<?php echo site_url('mobile/member/profile') ?>">个人信息</a><i></i></li>
                <li class="menu-list-item item-password"><a href="<?php echo site_url('mobile/member/forgot') ?>">修改密码</a><i></i></li>
                <li class="menu-list-item item-unset"><a href="javascript:;" onclick="unset_login();return false;">退出登录</a><i></i></li>
            </ul>
        </div>
    </div>
</div>
<script>
    var loginUrl = '<?php echo site_url('member/index/login_verify')?>' ;
    $(function(){
        $.post(loginUrl,{action:'login'},function(data){var json = eval("("+data+")");if(json['status']=='1'){
            if(json['action']=='login'){
                var str = "<a>你好,"+json['data']+"</a><a href='javascript:void(0)' onclick='unset_login()'>退出</a>" ;
                $('#loginInfo').empty().html(str);
                $('#memberboxa').empty().html('<a href="http://v.zhanglvbao.com/demo/member/index/center">'+json['data']+'</a>');
                $('#memberboxb').empty().html("<a href='javascript:void(0)' onclick='unset_login()'>退出</a>");
            }}})});
    function unset_login(){
        $.get('<?php echo site_url('admin/index/logout')?>');
        $.post(loginUrl,{ action:'unset' },function(data){ var json = eval("("+data+")");if(json['status']=='1'){if(json['action']=='unset'){window.location.reload(); } }})}
</script>
<?php $this->load->module('mobile/index/footer', $common); ?>
